package com.ibm.mq.point.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.function.Consumer;

@Slf4j
@Component
public class PubListening {
    @Bean
    Consumer<TestMessaging> pub() {
        log.info("初始化IBM 点对点 消费");
        return msg -> {
            log.info("通过stream消费到  点对点  消息 => {}", msg.toString());
            log.info(" 点对点  {}", msg.getMsgText());
        };
    }
}
